#pragma once
#include <iostream>

char bar[102];
void progressBar(int i, int total){
  float progress = (float)i/(total-1);
  printf("[%-100s][%d%%]\r", bar, (int)(progress*100));
  if(progress == 1){
    printf("\n");
    printf("complete!\n");
  }else{
  fflush(stdout);
  bar[(int)(progress*100)] = '#';
  }
}


